home *** CD-ROM | disk | FTP | other *** search
/ PC Graphics Unleashed / PC Graphics Unleashed.iso / ch18 / rtrace / readme < prev    next >
Text File  |  1993-09-03  |  3KB  |  95 lines

  1.  
  2. For those who have a 386+387 (or 486) machine it is now possible to
  3. produce images with a good level of realism. The source code is
  4. available to anyone to look at, study, use, etc.
  5.  
  6. Installation is:
  7.  
  8. 0. Define a variable GO32 if you don't have a 387
  9.    dos> set GO32=emu DRIVE:/PATH/emu387
  10.  
  11.    If you have a SVGA card, you can preview the image being traced
  12.    in colors or in grey-scale. The variable GO32 should define the
  13.    graphic driver suitable for your SVGA card.
  14.  
  15.    For a GRD driver, do:
  16.    dos> set GO32=... driver DRIVE:/PATH/DRIVER gw 800 gh 600
  17.  
  18.    For a GRN driver, do:
  19.    dos> set GO32=... driver DRIVE:/PATH/DRIVER gw 800 gh 600 nc 256
  20.  
  21.    where DRIVER is one of *.GRD or *.GRN drivers (please check the
  22.    DRIVERS archive).
  23.  
  24. The steps to follow to create images are:
  25.  
  26. 1. Create using a text editor a file with the scene description
  27.    (view point, lights, objects, etc).
  28.    Look at the .scn files for an example; the format description
  29.    is in the file scn2sff.lst.
  30.  
  31.    CPP (or M4) macros and so on can be used...
  32.  
  33. 2. Next, process the .scn file (let's suppose it is called demo.scn)
  34.    using CPP (or M4) and then by SCN2SFF converter, to obtain the
  35.    input file for the ray-tracer program (demo.sff).
  36.  
  37.    Example:
  38.    dos> cpp -P demo.scn | scn2sff - > demo.sff
  39.  
  40. 3. Run RTRACE with chosen arguments (look in rtrace.txt).
  41.  
  42.    Example:
  43.    [Resolution 256x256, no antialiasing, with textures]
  44.    dos> rtrace w256 t1 demo.sff demo.pic >demo.log
  45.    or
  46.    dos> rtrace w256 t1 O1 demo.sff demo.ppm >demo.log
  47.  
  48.    Wait a moment... Done.
  49.  
  50.    To preview the image, please add option V-1 (grey-scale) or
  51.    V-2 (colors, approximate).
  52.  
  53. 4. To view the image (file demo.pic or demo.ppm), it is necessary to
  54.    convert it to a standard format like GIF or any other.
  55.    Use the PIC2RAW program to convert to input file for shareware
  56.    program ALCHEMY (demo.raw). ALCHEMY reads the .ppm files directly.
  57.    Or convert with PIC2RGB to a raw format that PICLAB understands
  58.    and do the manipulation with this program (very good).
  59.  
  60.    I recommend to produce PPM files, because many programs read them
  61.    directly (another good image manipulation program is in DISP153.ZIP
  62.    -- also compiled with the GNU C compiler for DOS like this ray tracer).
  63.  
  64.    Example:
  65.    dos> pic2raw demo
  66.  
  67.    With ALCHEMY it is possible to convert to many other formats
  68.    (GIF, Targa, PCX, etc).
  69.    It is also possible to view in a VGA card with ALCHEMY.
  70.    To display, use ALCHEMY, PICLAB, CSHOW or others...
  71.  
  72.  
  73. There are many .scn and .sff available...
  74.  
  75. Description:
  76.         logo.scn        - logo of my institute, INESC
  77.         h2so4.scn       - molecule H2SO4
  78.         vitam_a1.scn    - vitamin A1
  79.         header.h        - include for previous 2
  80.         balls.scn       - balls
  81.  
  82.         csg.scn        - a CSG object and 3D text
  83.     (try scn2sff csg.scn|rtrace w400 p1 t1 m0 V-1 - nul)
  84.  
  85.      
  86. Hope you like it,
  87.  
  88. Antonio Costa
  89. (acc@asterix.inescn.pt)
  90. -----
  91. All this stuff is available by anonymous ftp at:
  92.  
  93. asterix.inescn.pt [192.35.246.17] - pub/RTrace (UNIX, DOS, MAC)
  94. wuarchive.wustl.edu               - Graphics/graphics/ray/RTrace
  95.